home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_03
/
allison
/
hello.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1994-02-07
|
296 b
|
16 lines
LISTING 10 - A "Hello, world!" program
/* hello.c: Greet either the user or the world */
#include <stdio.h>
main(int argc, char *argv[])
{
if (argc > 1 && argv[1] != NULL)
printf("Hello, %s!\n",argv[1]);
else
printf("Hello, world!\n");
return 0;
}